package cn.ztr.ymcc.web.controller;

import cn.ztr.ymcc.result.JsonResult;
import cn.ztr.ymcc.service.IVerifycodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/verifycode")
public class verifycodeController {

    @Autowired
    private IVerifycodeService verifycodeService;

    /**
     * 发送短信验证码
     * @param phone
     * @return
     */
    @GetMapping("/sendSmsCode/{phone}")
    public JsonResult sendSmsCode(@PathVariable("phone")String phone){

        return verifycodeService.sendSmsCode(phone);
    }
}
